package cn.iocoder.yudao.module.hs.dal.dataobject.shiporderdetail;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

/**
 * 出库单明细 DO
 *
 * @author 航盛
 */
@TableName("hs_ship_order_detail")
@KeySequence("hs_ship_order_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ShipOrderDetailDO extends BaseDO {

    /**
     * 主键
     */
    @TableId
    private Long id;
    /**
     * 出库单ID
     */
    private Long shipOrderId;
    /**
     * 物料名称
     */
    private String materialName;
    /**
     * 物料代码
     */
    private String modeCode;
    /**
     * 数量
     */
    private Integer materialCount;
    /**
     * 采购订单号
     */
    private String purchaseOrderCode;
    /**
     * 采购订单行项目号
     */
    private String purchaseOrderNo;

    public ShipOrderDetailDO(Long id, Long shipOrderId, String materialName, String modeCode, int materialCount) {
        this.id = id;
        this.shipOrderId = shipOrderId;
        this.materialName = materialName;
        this.modeCode = modeCode;
        this.materialCount = materialCount;
        this.purchaseOrderCode = null;
        this.purchaseOrderNo = null;
    }
}